package com.example.good.entity;


import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Collections;
import java.util.List;

/**
 * 分页
 * @param <E>
 */
@Data
@AllArgsConstructor
public class PageVO<E> {

    /**
     * 记录总的页数
     */
    private int count;

    /**
     * 当前页面下标
     */
    private int currentPageIndex;

    /**
     * 一页的数据大小
     */
    private int pageSize;

    /**
     * 当前页面记录
     */
    private List<Object> currentPageDateList;

    /**
     * 总的页面数
     */
    private int pageTotal;
    
    public PageVO(){
        this.currentPageDateList = Collections.emptyList();
        this.count = 0;
        this.currentPageIndex = 1;
        this.pageSize = 0;
        this.pageTotal = 0;
    }
    
    public PageVO(int currentPageIndex, int pageSize){
        this.currentPageDateList = Collections.emptyList();
        this.count = currentPageIndex;
        this.currentPageIndex = 1;
        this.pageSize = pageSize;
        this.pageTotal = 0;
        
    }
    
    
}
